package com.tp.service.controller;

import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/test")
@RestController
public class TestController {

    @GetMapping(path = "/t1")
    public String test(String name){
        return "hello -->" + name;
    }


    @GetMapping("/exception")
    public String exception(){
        throw new RuntimeException("runtimeException");
    }

}
